package org.lucky_common.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("lucky_share")
public class LuckyShare extends Model<LuckyShare> {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @TableField("inviteCode")
    private String inviteCode;
    @TableField("inviteCode2")
    private String inviteCode2;
    @TableField("count")
    private Integer count = 0;
    @TableField("verifyCount")
    private Integer verifyCount = 0;
    @TableField("userId")
    private Long userId;
    @TableField("parentId")
    private Long parentId;
    @TableField(exist = false)
    private boolean isExpire = false;
    @TableField("submitParam")
    private boolean submitParam;
    @TableField("secondStage")
    private boolean secondStage;
    @TableField(exist = false)
    private InviteParam inviteParam;
    @TableField("firstStage")
    private boolean firstStage;
    @TableField(exist = false)
    private String url;
    @TableField("data")
    private String data;
    @TableField("clickCount")
    private Integer clickCount = 0;

    public LuckyShare(Long id, String inviteCode, String inviteCode2, Integer count, Integer verifyCount, Long userId, Long parentId, boolean isExpire, boolean submitParam) {
        this.id = id;
        this.inviteCode = inviteCode;
        this.inviteCode2 = inviteCode2;
        this.count = count;
        this.verifyCount = verifyCount;
        this.userId = userId;
        this.parentId = parentId;
        this.isExpire = isExpire;
        this.submitParam = submitParam;
    }
}
